import { defineStore } from 'pinia'

export const useCounterStore = defineStore('userinfo', {
  state: () => {
    return{
      userInfo: {
        id: '',
        name: ''
      }
    }
  },
  getters: {
    getIsLogin(){
      return this.userInfo.id !== ''
    }
  },
  actions: {
    setUserInfo(userInfo){
      this.userInfo = userInfo
    }
  }
})
